package JFrame;

import javax.swing.*;

public class FlowLayout {
    public static void main(String[] args) {
        JFrame frame=new JFrame();
        frame.setBounds(200,200,400,300);
        frame.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
        frame.setTitle("流程布局");
        frame.setVisible(true);
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

        JButton bt1 = new JButton("按钮1");
        JButton bt2 = new JButton("按钮2 ");
        JButton bt3 = new JButton("按钮3");
        JButton bt4 = new JButton("按钮4");
        JButton bt5 = new JButton("按钮5");
        JButton bt6 = new JButton("按钮6");
        frame.add(bt1);
        frame.add(bt2);
        frame.add(bt3);
        frame.add(bt4);
        frame.add(bt5);
        frame.add(bt6);


    }
}
